﻿#ifndef PLCREADTHREAD_H
#define PLCREADTHREAD_H

#include <QObject>
#include <QThread>
#include <QTimer>
#include <QMutex>

#define PLCREADNB 100

namespace HIM {

class PlcReadThread: public QThread
{
    Q_OBJECT

public:
    explicit PlcReadThread(){};
    ~ PlcReadThread(){};
    virtual void run() override;

public slots:
    void on_timeout();

private:   
    uint16_t dataLocal[PLCREADNB];
    uint16_t dataNew[PLCREADNB]; 
    int addr{0};
    QMutex PLCMutex;
};
}

#endif // PLCREADTHREAD_H
